<?php
include_once(dirname(__FILE__)."/../../src/user_data_handler.php");
include_once(dirname(__FILE__)."/../../src/config.inc.php");


class Test002 extends UnitTestCase
{
 function test()
 {
 	MYSQL_CONNECT(DB_SERVER,DB_USER_NAME,DB_USER_PASSWORD) OR DIE("Datenbankverbindung konnte nicht hergestellt werden!");
	@mysql_select_db("template_dragon") or die("Datenbank nicht gefunden!"); 
	
	$userdata = new InsertUserData();
	$userdata->insertData('First', 'Last', 'Adresse', '8010', 'Stadt', 'Land', '0000', 'Arbeitgeber', 'Mail@host.net', 'Titel', 'www.homepage.com', 'Entwickler');

 	$query = "Select * FROM userdata WHERE firstname = 'First' AND lastname = 'Last'";
  $result = MYSQL_QUERY($query);
	$num_rows =  mysql_num_rows($result);
 	$this->assertNotNull($num_rows);
 }
}
?>
